package com.gmrz.uaf.protocol.v1.processor;

import com.gmrz.uaf.common.Constants;
import com.gmrz.uaf.protocol.v1.schema.OperationHeader;
import com.gmrz.uaf.protocol.v1.schema.Version;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.name.Named;

public class UpdateOpHeaderProvider
        implements Provider<OperationHeader> {
    private String appID = null;
    private Version protocolVersion = new Version();

    @Inject
    private void setApplicationID(@Named("uaf.application.id") String appID) {
        this.appID = appID;
    }

    public OperationHeader get() {
        return new OperationHeader().withApplicationID(this.appID).withOperation(Constants.Operation.UPDATE).withProtocolVersion(this.protocolVersion);
    }
}
